import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'discount'
})
export class DiscountPipe implements PipeTransform {

  transform(value: number, args?: number): any {
    if (!args || args == 0) {
      return value;
    }
    return value*args;
  }

}
